home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / antenna / azproj10 / az.nr < prev    next >
Text File  |  1995-07-19  |  10KB  |  264 lines

  1.  (text from the Central States VHF Soc abstracts, 1994                    
  2.  
  3.  
  4.  
  5.  
  6.            az_proj.ps - A program to create azimuthal equidistant
  7.                                map projections
  8.  
  9.       Joseph Mack (NA3T) and Michael Katzmann (NV3Z / VK2BEA / G4NYV) *
  10.  
  11.  
  12.  
  13.    Abstract
  14.  
  15.         The azimuthal equidistant, or 'great circle' map  projection  is  a
  16.    useful  tool  for  the  radio amateur in quickly determining the correct
  17.    direction to point antennas between two points on  the  surface  of  the
  18.    earth.  Unlike  conventional maps, that attempt to maintain the shape of
  19.    surface features, the azimuthal projection maintains only the  direction
  20.    and  distance  from a single site. The map, consequently, is only useful
  21.    for that site.
  22.  
  23.         It was felt that a simple, inexpensive method for the individual to
  24.    create their own azimuthal projections was desirable. The flexibility to
  25.    customize the map, in order to show a particular area  of  interest  and
  26.    include  features  required  by the user, were of prime importance.  The
  27.    criteria of simplicity, and  non-dependence  on  specific  hardware  and
  28.    software  were  the  principle  motives  in choosing the Postscript page
  29.    description language to implement this idea.
  30.  
  31.  
  32.    Capabilities
  33.  
  34.         The program is capable of displaying a map from almost any point on
  35.    the  earth  at  any scale. The map may be offset, so that an area can be
  36.    enlarged without having to include the base site. Thus a  map  based  on
  37.    Washington  DC  has  the ability to show, for example, only Europe. Grid
  38.    squares, based on the Maidenhead system, may be overlayed on the map  at
  39.    the  discretion  of  the  user. Likewise compass bearings are optionally
  40.    available.  Facilities have been included to print either  callsigns  or
  41.    country  names from a standard file of DXCC callsigns available from the
  42.    ARRL bulletin board.  Labels  may  be  added  to  the  map  to  indicate
  43.    features at the discretion of the user. One use of this might be to pro-
  44.    duce a local repeater or beacon map.
  45.  
  46.         All of the program and data files in this package are freely redis-
  47.    tributable.   The  main  map data is derived from the C.I.A. world data-
  48.    base. It has a resolution of between 50 and 100 metres. Maps can thus be
  49.    produced  of quite small areas whilst retaining reasonable detail. Coun-
  50.    try borders, major rivers and lakes, islands and U.S., Canadian and Aus-
  51.    tralian states are included in the database. There is approximately four
  52.    megabytes of ascii data files, split into continents.
  53.  
  54.    ________
  55.      *
  56.        Joseph Mack.      (301) 402-4573 (Work)   Internet: mack@ncifcrf.gov
  57.        Michael Katzmann. (410) 721-5151 (Work)   Internet: michael%vk2bea@secondsource.COM
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.     NV3Z & NA3T            Azimuthal Map Projections                 Page 2
  70.  
  71.  
  72.    Implementation
  73.  
  74.         Postscript is a programming language developed by Adobe Systems for
  75.    use in desktop publishing. It is a page description language. That is to
  76.    say, one uses instructions to tell the device how to print characters or
  77.    figures  on  the  page. A Postscript printer differs from a conventional
  78.    printer in that you must send it not just the text you want printed, but
  79.    a  program that tells the printer how the text or data received is to be
  80.    interpreted.  Postscript is  a  stack  orientated  language,  much  like
  81.    Forth,  and  its  operation  is somewhat analogous to an RPN calculator.
  82.    Data is pushed on the stack (last in first out) and then  operated  upon
  83.    by   a   function.   The  az_proj.ps  program  is  entirely  written  in
  84.    Postscript, so that with a  Postscript  capable  printer,  all  that  is
  85.    required to create a map is to customize the program options and send it
  86.    (azproj.ps) and the data files to the printer. It is the  printer,  not
  87.    the  computer  that  executes the program, transforming the latitude and
  88.    longitude information from the data files into bearing and distance, and
  89.    then  drawing  the  map.  In that sense the program is computer indepen-
  90.    dent, since the only purpose of the computer is to store the plain ASCII
  91.    files.
  92.  
  93.  
  94.  
  95.    ...but I don't have a Postscript printer!
  96.  
  97.         If your printer doesn't understand Postscript, it  is  still  quite
  98.    likely   that  you  can  use  this  program.  A  freely  redistributable
  99.    Postscript interpreter is available that supports a myriad  of  printers
  100.    and  display  devices.  This  program  is Ghostscript and is distributed
  101.    under the terms of the GNU  public  license.  It  runs  on  MS-DOS,  MS-
  102.    Windows,  Unix,  VMS  and  other  systems.   Ghostscript  interprets the
  103.    Postscript code and creates a bitmap that is printed or displayed. Under
  104.    this  arrangement,  the program is executed by the host computer, and it
  105.    is the printer that is the 'dumb' recipient of the bitmap.
  106.  
  107.         Printer drivers for HP deskjet and paintjet  series,  HP  laserjet,
  108.    Cannon   bubblejet,   Epson   dot  matrix  and  others  are  built  into
  109.    Ghostscript. Video display  drivers,  which  render  Postscript  on  the
  110.    screen,  are  present for VGA, super VGA, MS-windows, the X Windows sys-
  111.    tem, GIF and PCX formats. This is an ideal way to preview  the  program,
  112.    to ensure that the output is what you expect, even if you actually print
  113.    it on a Postscript printer.  If you have a fast  computer,  Ghostscript*
  114.    will  probably  give  you  better performance than a Postscript printer.
  115.    Postscript printers rarely have floating point math hardware  installed,
  116.    which speeds the execution of this program greatly. An Intel 486/66 pro-
  117.    cessor is 18 times faster than an HP1200C/PS Postscript printer in  exe-
  118.    cuting this program.
  119.    ________
  120.      * Ghostscript is freely available (with the GNU License), on the
  121.        internet from ftp.cs.wisc.edu:/pub/ghost, and from the GNU servers
  122.        everywhere.
  123.        Ghostscript is Copyright Aladdin Enterprises.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.     NV3Z & NA3T            Azimuthal Map Projections                 Page 3
  136.  
  137.  
  138.    Customizations
  139.  
  140.         The program has been designed to allow easy modification, in  order
  141.    to  tailor  the map to the user's preferences. Those parameters that are
  142.    most often changed, are clustered in the 'options' array.   These  vari-
  143.    ables are:
  144.  
  145.       o latitude and longitude of the QTH, (the position that the  distance
  146.         and bearing is referenced to)
  147.  
  148.       o latitude and longitude of the center of the map, (the center of the
  149.         map does not need to be the same as the QTH)
  150.  
  151.       o scale of the map in either km:cm or degrees  of  solid  angle  sub-
  152.         tended  from  the  center  of the earth (each degree is 60 nautical
  153.         miles)
  154.  
  155.       o title of the map
  156.  
  157.       o enable printing of lettered Maidenhead grid square boundaries
  158.  
  159.       o enable printing of lettered Maidenhead designators
  160.  
  161.       o enable printing of numbered Maidenhead grid square boundaries
  162.  
  163.       o enable printing of numbered Maidenhead designators
  164.  
  165.       o enable printing of compass bearing lines
  166.  
  167.       o enable printing of distance circle
  168.  
  169.       o enable printing of outer bearing circle
  170.  
  171.       o if DXCC data file supplied, print either callsign or country name
  172.  
  173.    The options array for a map of the continental US, based on Greenbelt MD
  174.    but centered on the mid west, would be configured as follows:
  175.    /options
  176.    [
  177.        39.0        -76.845         (WA3NAN - NASA Goddard)
  178.        40          -89             true    % The midwest & enable offset
  179.        200         true                    % scale, km/cm (degrees),
  180.        true                                % landscape (portrait)
  181.        on          on                      % letter grid squares, labels
  182.        on          on                      % number grid squares, labels
  183.        on                                  % compass circumference,
  184.        on          off                     % compass radial spokes, outerborder
  185.        true                                % callsigns (country name)
  186.    ] def
  187.  
  188.    A comment in Postscript is preceded by  a  '%',  thus  we  are  able  to
  189.    include  some explanation with each variable.  Other standard Postscript
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.     NV3Z & NA3T            Azimuthal Map Projections                 Page 4
  202.  
  203.  
  204.    variables can be modified to change color,  line  thickness,  fonts  and
  205.    font  sizes.  These  are  heavily  sign-posted  throughout the code, and
  206.    should be obvious to non-Postscript programmers.  Colors for the various
  207.    features  are  defined  in  terms  of  R  G  B values from 0 (dark) to 1
  208.    (bright). For example we define a variable lightred as:
  209.    /lightred      { 1.0 0.33 0.33  }  def
  210.  
  211.    We can use this later to define the color of, say, our grid square boun-
  212.    daries.
  213.    /grid_locator_letter_color      /lightred cvx   def
  214.  
  215.    In Postscript a variable name is preceded by a '/'. The def assigns  the
  216.    value to the variable.
  217.  
  218.  
  219.    Examples
  220.  
  221.         The following example maps are intended to show some  of  the  pro-
  222.    grammes  capabilities.  Since they are rendered in monochrome here, ena-
  223.    bling all the features on the one map  would  be  quite  confusing.  The
  224.    enhanced  definition  available  with a color print makes this practical
  225.    however.  The following prints show:
  226.  
  227.     1.  The whole world with the compass lines and outer border.
  228.  
  229.     2.  Western Europe as it appears from Annapolis.
  230.  
  231.            - This also shows the DXCC  country  callsigns  which  are  read
  232.              directly from the ARRL file.
  233.  
  234.     3.  A regional map of the north-east US based on Newington CT.
  235.  
  236.            - This includes  both  lettered  and  numbered  Maidenhead  grid
  237.              squares.
  238.  
  239.     4.  The CONUS based on Annapolis but centered on the mid-west.
  240.  
  241.  
  242.    Conclusion
  243.  
  244.         It is hoped that this program will be of use to the amateur commun-
  245.    ity,  and we encourage its wide distribution. There are still many ideas
  246.    to be included in future versions, and with constructive  feedback  from
  247.    users, no doubt its utility will be enhanced.
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.